<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>波浪按钮</title>
  </head>
  <body>
    <nav>
      <ul>
        <li>
          INICIO
          <span></span>
          <span></span>
          <span></span>
          <span></span>
        </li>
        <li>
          SERVICIOS
          <span></span>
          <span></span>
          <span></span>
          <span></span>
        </li>
        <li>
          EQUIPO
          <span></span>
          <span></span>
          <span></span>
          <span></span>
        </li>
        <li>
          CONTACTO
          <span></span>
          <span></span>
          <span></span>
          <span></span>
        </li>
      </ul>
    </nav>
  </body>
  <style>
    :root {
      --c: #311b92;
    }
    body {
      margin: 0;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: black;
    }
    nav > li {
      list-style-type: none;
      margin: 0;
      padding: 0;
    }

    nav > ul > li > span:nth-child(1) {
      --n: 1;
    }

    nav > ul > li > span:nth-child(2) {
      --n: 2;
    }

    nav > ul > li > span:nth-child(3) {
      --n: 3;
    }

    nav > ul > li > span:nth-child(4) {
      --n: 4;
    }
    nav > ul > li {
      position: relative;
      cursor: pointer;
      color: white;
      font-size: 16px;
      font-weight: bold;
      font-family: sans-serif;
      border: 0.3em solid var(--c);
      border-radius: 0.5em;
      width: 12em;
      height: 3em;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      text-align: center;
      line-height: 3em;
      overflow: hidden;
      z-index: 1;
      transition: all 0.5s;
      margin: 1em;
    }
    nav > ul > li > span {
      position: absolute;
      width: 25%;
      height: 100%;
      background-color: var(--c);
      transform: translateY(150%);
      border-radius: 50%;
      left: calc((var(--n) - 1) * 25%);
      transition: all 0.5s;
      transition-delay: calc((var(--n) -1) * 0.1s);
      z-index: -1;
    }
    nav > ul > li:hover {
      color: white;
    }
    nav > ul > li:hover > span {
      transform: translateY(0) scale(2);
    }
  </style>
</html>
